/**
 * 弹出框提示消息
 * success/warning/info/error
 */
export function msgBox(title = "", msg = "", type = "") {
  MessageBox.alert(msg, "提示", {
    title: title,
    confirmButtonText: "确定",
    type: type,
  });
};


/**
 * options 对象格式转换
 */
export function requestUrlJoin(url = "", params = {}) {
  let urlStr = '?'
  for (let val in params) {
    if (params[val] && params[val] != null) {
      urlStr += val + '=' + params[val] + '&'
    }
  }
  if (urlStr[urlStr.length - 1] === '&') {
    urlStr = urlStr.slice(0, urlStr.length - 1)
  }
  return url + urlStr
}